/*
 *  Copyright (c) M2TK Project. All rights reserved.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package m2tk.assistant.common.domain;

import java.util.Objects;

public class SIService
{
    private int id;

    private String name;
    private String provider;

    private int transportStreamId;
    private int originalNetworkId;
    private int serviceId;
    private int serviceType;
    private String serviceTypeName;
    private int runningStatus;
    private String runningStatusName;
    private boolean freeAccess;
    private boolean presentFollowingEITEnabled;
    private boolean scheduleEITEnabled;
    private boolean actualTransportStream;

    private int referenceServiceId;

    public boolean isNVODReferenceService()
    {
        return serviceType == 0x04;
    }

    public boolean isNVODTimeShiftedService()
    {
        return serviceType == 0x05;
    }

    @Override
    public boolean equals(Object o)
    {
        if (o == null || getClass() != o.getClass()) return false;
        SIService service = (SIService) o;
        return id == service.id;
    }

    @Override
    public int hashCode()
    {
        return Objects.hashCode(id);
    }

    public int getId()
    {
        return id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getProvider()
    {
        return provider;
    }

    public void setProvider(String provider)
    {
        this.provider = provider;
    }

    public int getTransportStreamId()
    {
        return transportStreamId;
    }

    public void setTransportStreamId(int transportStreamId)
    {
        this.transportStreamId = transportStreamId;
    }

    public int getOriginalNetworkId()
    {
        return originalNetworkId;
    }

    public void setOriginalNetworkId(int originalNetworkId)
    {
        this.originalNetworkId = originalNetworkId;
    }

    public int getServiceId()
    {
        return serviceId;
    }

    public void setServiceId(int serviceId)
    {
        this.serviceId = serviceId;
    }

    public int getServiceType()
    {
        return serviceType;
    }

    public void setServiceType(int serviceType)
    {
        this.serviceType = serviceType;
    }

    public String getServiceTypeName()
    {
        return serviceTypeName;
    }

    public void setServiceTypeName(String serviceTypeName)
    {
        this.serviceTypeName = serviceTypeName;
    }

    public int getRunningStatus()
    {
        return runningStatus;
    }

    public void setRunningStatus(int runningStatus)
    {
        this.runningStatus = runningStatus;
    }

    public String getRunningStatusName()
    {
        return runningStatusName;
    }

    public void setRunningStatusName(String runningStatusName)
    {
        this.runningStatusName = runningStatusName;
    }

    public boolean isFreeAccess()
    {
        return freeAccess;
    }

    public void setFreeAccess(boolean freeAccess)
    {
        this.freeAccess = freeAccess;
    }

    public boolean isPresentFollowingEITEnabled()
    {
        return presentFollowingEITEnabled;
    }

    public void setPresentFollowingEITEnabled(boolean presentFollowingEITEnabled)
    {
        this.presentFollowingEITEnabled = presentFollowingEITEnabled;
    }

    public boolean isScheduleEITEnabled()
    {
        return scheduleEITEnabled;
    }

    public void setScheduleEITEnabled(boolean scheduleEITEnabled)
    {
        this.scheduleEITEnabled = scheduleEITEnabled;
    }

    public boolean isActualTransportStream()
    {
        return actualTransportStream;
    }

    public void setActualTransportStream(boolean actualTransportStream)
    {
        this.actualTransportStream = actualTransportStream;
    }

    public int getReferenceServiceId()
    {
        return referenceServiceId;
    }

    public void setReferenceServiceId(int referenceServiceId)
    {
        this.referenceServiceId = referenceServiceId;
    }
}
